<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
</html>


<!-- <script type="text/javascript">
    var n ='a';
    switch(n){
        case "a":
            console.log('a');
        case 2:
            console.log(2);
        case true:
            console.log(3);
    }
</script> --> 
case配对条件的上面不执行，下面执行

<!-- break 终止循环--> 
<!-- <script type="text/javascript">
    var date= window.prompt('input');
    switch(date){
        case 'monday':
        case 'tuesday':
        case 'wednesday':
        case 'thurday':
        case 'friday':
            console.log('working');
            break;
        case 'saturday':
        case 'sunday':console.log('relax');
        break;
    }
</script> -->

<!-- <script>

    var i=0;
    while(1){
        i++;
        console.log(i);
        if(i>100){
            break;
        }
    }
</script> -->

<!-- 判断总和大于100 -->
<!-- <script>
    var i=0;
    var sum=0;
    for(var i=0;i<100;i++){
        sum+=i;
        console.log(i);
        if(sum>100){
            break;
        }
    }
</script> -->

<!-- continue终止本次循环，进行下一次循环 -->
<!-- <script>
    for(var i=0;i<100;i++){
        if(i%7==0||i % 10==7){
            continue
        }
        console.log(i);
    }
    
</script> -->